package com.juyu.miliao.api.domain;

import java.io.Serializable;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

import javax.validation.constraints.Min;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.juyu.miliao.api.domain.vo.HostUserLevelVo;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonView;
import com.juyu.miliao.api.util.JacksonView;
import com.juyu.miliao.api.validator.UpdateUserInfoCheck;

/**
 * 用户信息
 *
 * @author wbf
 */
@JsonIgnoreProperties(ignoreUnknown = true)
public class User implements Serializable {

    private static final long serialVersionUID = -5570992953659918515L;
    /**
     * id
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.UserCall.class,
            JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class
            ,JacksonView.HomePageHostList.class})
    @Min(value = 1, groups = {UpdateUserInfoCheck.class})
    private long userId;
    /**
     * 昵称
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.UserCall.class,
            JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class
            ,JacksonView.HomePageHostList.class})
    private String nickName;
    /**
     * 性别：1 男 2 女
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.UserCall.class,
            JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private int sex;
    /**
     * 生日
     */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonIgnore
    @JsonView(JacksonView.Visitor.class)
    private LocalDate birthday;
    /**
     * 生日时间戳
     */
    @JsonView(JacksonView.Visitor.class)
    private String birthdayInstant;
    /**
     * 城市
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class})
    private String city;
    /**
     * 个性签名
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.QualityHost.class,
            JacksonView.CommonSortUser.class,JacksonView.SameCityUser.class})
    private String signature;
    /**
     * 语音签名
     */
    private String voiceSignature;
    /**
     * 头像
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.UserCall.class,
            JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,
            JacksonView.SameCityUser.class
            ,JacksonView.HomePageHostList.class})
    private String icon;
    /**
     * 是否接听电话：1 是 2 不是
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private int isCall;
    /**
     * 是否接听视频：1 接听 2 不接听
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private int isVideo;
    /**
     * 聊天价格
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private String chatPrice;
    /**
     * 视频价格
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class
            ,JacksonView.HomePageHostList.class})
    private String videoPrice;
    /**
     * 是否vip：1 是 2 不是
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,
            JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private int isVip;
    @JsonIgnore
    private LocalDateTime updateTime;
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;
    /**
     * 同城夜聊vip等级 0线上包 1畅聊 2qq 3微信 4全部
     */
    private int vipPayType;

    /** user_count字段*/
    /**
     * m具体值
     */
    @JsonView(JacksonView.Follow.class)
    private int mGradeSum;
    /**
     * v具体值
     */
    @JsonView({JacksonView.Follow.class, JacksonView.CommonSortUser.class})
    private int vGradeSum;
    /**
     * m等级
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private String mGrade;
    /**
     * v等级
     */
    @JsonView({JacksonView.Follow.class, JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,
            JacksonView.SameCityUser.class})
    private String vGrade;

    /**
     * 关注数
     */
    private int followSum;
    /**
     * 粉丝数
     */
    private int fansSum;
    /**
     * 私照数
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private int privatePhotoSum;
    /**
     * 访客数
     */
    private int visitorSum;
    /**
     * 通话时长
     */
    private String callTimeSum;
    /**
     * 接通成功数
     */
    private int callSuccessSum;
    /**
     * 接通失败数
     */
    private int callFailSum;
    /**
     * 接通率
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private String callRate;
    /**
     * 视频数
     */
    @JsonView({JacksonView.Follow.class, JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private int videoSum;
    /**
     * 来访时间
     */
    @JsonView(JacksonView.Visitor.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime visitorTime;
    /**
     * 年龄
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.QualityHost.class, JacksonView.CommonSortUser.class,
            JacksonView.SameCityUser.class})
    private int age;
    /**
     * 是否关注：1是 2否
     */
    @JsonView({JacksonView.Follow.class,JacksonView.QualityHost.class})
    private int isFollow;
    /**
     * m下一等级要求值
     */
    private int mNextGradeSum;
    /**
     * v下一等级要求值
     */
    private int vNextGradeSum;
    /**
     * 是否是主播 1 是  2 否
     */
    @JsonView({JacksonView.Follow.class,JacksonView.SameCityUser.class,JacksonView.Visitor.class
            ,JacksonView.HomePageHostList.class})
    private int isHost;
    /**
     * 是否是认证主播1：是 2：否 3：审核中 默认值为2
     */
    private int isCertificationHost;
    /**
     * 打招呼内容
     */
    @JsonView(JacksonView.UserCall.class)
    private String say;
    /**
     * 是否在线 0离线，1在线，2繁忙，3勿扰
     */
    @JsonView({JacksonView.CommonSortUser.class, JacksonView.Visitor.class, JacksonView.QualityHost.class,
            JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private int isLine;
    /**
     * 关注时间
     */
    @JsonView(JacksonView.Follow.class)
    private String followDate;
    /**
     * 语音签名时长
     */
    private int voiceSignatureTime;
    /**
     * 用户个人信息带出钱包数据
     */
    private UserWallet userWallet;
    /**
     * 用户等级信息
     */
    @JsonView({JacksonView.Follow.class,JacksonView.QualityHost.class})
    private EnergyLevel energyLevel;
    /**
     * 主播等级信息
     */
    @JsonView({JacksonView.Follow.class,JacksonView.QualityHost.class,JacksonView.HomePageHostList.class})
    private HostUserLevelVo hostUserLevelVo;
    /**
     * 发现列表照片墙第一张
     */
    @JsonView({JacksonView.QualityHost.class,JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private String picUrl;
    /**
     * 线下包增加字段vest_icon
     */
    private String vestIcon;
    /**
     * huami 1.2需求 列表增加标签列表
     */
    @JsonView({JacksonView.QualityHost.class,JacksonView.SameCityUser.class})
    private List<Label> labelList;
    /**
     * 用户封面
     */
    @JsonView({JacksonView.QualityHost.class,JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private String userCoverUrl;
    /**
     * 来访时间
     */
    @JsonView(JacksonView.Visitor.class)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String showTime;
    /**
     * 接通免费聊、免费抢聊类型0没有、1语音、2视频
     */
    private int callType;
    /**
     * vip有效时间（单位：天）
     */
    private int vipDate;
    /**
     * 接通成功语音数
     **/
    private int callSuccessSumVoice;
    /**
     * 接通成功视频数
     **/
    private int callSuccessSumVideo;
    /**
     * 1.4花蜜需求,用户列表随机封面
     */
    @JsonView({JacksonView.QualityHost.class,JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private List<UserCoverUrl> userCoverUrlList;

    /**1.4.2 主播星级*/
    @JsonView({JacksonView.QualityHost.class,JacksonView.SameCityUser.class,JacksonView.Follow.class
                ,JacksonView.Visitor.class})
//    private int star;

    /** 1.4.2 ios需求 用户个人信息增加是否审核开关*/
    private Boolean cmsSw;
    /** 1.4.2 ios需求 免费抢聊接口 增加一个字段价格描述，审核是返回在线状态，非审核时显示价格*/
    private String isCallLine;

    @JsonView({JacksonView.Follow.class,JacksonView.Visitor.class})
    private int vipLevel;
    /**
     * 是否允许修改位置1:允许修改 0:不允许修改
     */
    private int positionSwitch;
    /**
     * 用户定位地址，地址格式：省，例如：浙江省，空代表地址未知
     */
    @JsonView({JacksonView.SameCityUser.class,JacksonView.QualityHost.class,JacksonView.Follow.class})
    private String locationProvince;
    /**
     * 用户定位地址，地址格式：市，例如：杭州市，空代表地址未知
     */
    @JsonView({JacksonView.SameCityUser.class,JacksonView.QualityHost.class,JacksonView.Follow.class})
    private String locationCity;

    /**
     * 是否为置顶用户
     */
    @JsonView(JacksonView.QualityHost.class)
    private int isTop;

    private int enable;
    /**
     * 经纬度lat,lon,格式：纬度(lat),经度(lon)
     */
    private String location;
    /**
     * 能量值
     */
    private int energySum;

    /**
     * 用户积分值
     */
    private int integralSum;
    /**
     * 当前座驾id 关联level_info表
     */
    private int vehicleId;

    public int getVehicleId() {
        return vehicleId;
    }

    public void setVehicleId(int vehicleId) {
        this.vehicleId = vehicleId;
    }

    public int getEnergySum() {
        return energySum;
    }

    public void setEnergySum(int energySum) {
        this.energySum = energySum;
    }
    /**
     * 1.5.2 头像类型 1.官方 2 自定义
     */
    private int iconType;
    /**
     * 1.5.2 头像id
     */
    private int iconId;
    /**
     * 是否是svip 1.是 2.不是 默认（2）
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,
            JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private int isSvip;

    /**
     * 是否是铂金vip，1:是，2：不是
     */
    @JsonView({JacksonView.Visitor.class, JacksonView.CommonSortUser.class, JacksonView.QualityHost.class,
            JacksonView.SameCityUser.class,JacksonView.HomePageHostList.class})
    private int isPlatinumVip;
    /**
     * 工会id 对应union表
     */
    private int unionId;
    /**
     * 主播关联的运营id
     */
    private int adminId;
    private int agentId;
    /**
     * 运营名字
     */
    private String operationName;

    /**
     * 每小时收益
     */
    @JsonView({JacksonView.HomePageHostList.class})
    private double hourIncome;

    @JsonView({JacksonView.HomePageHostList.class})
    private double singOutDateTime;

    @JsonView({JacksonView.HomePageHostList.class})
    private String singOutDateTimeStr;
    /** 是否机器人账号：1是 2不是*/
    private int isRobot;

    public int getIsRobot() {
        return isRobot;
    }

    public void setIsRobot(int isRobot) {
        this.isRobot = isRobot;
    }

    public String getSingOutDateTimeStr() {
        return singOutDateTimeStr;
    }

    public void setSingOutDateTimeStr(String singOutDateTimeStr) {
        this.singOutDateTimeStr = singOutDateTimeStr;
    }

    public double getSingOutDateTime() {
        return singOutDateTime;
    }

    public void setSingOutDateTime(double singOutDateTime) {
        this.singOutDateTime = singOutDateTime;
    }

    public double getHourIncome() {
        return hourIncome;
    }

    public void setHourIncome(double hourIncome) {
        this.hourIncome = hourIncome;
    }

    public HostUserLevelVo getHostUserLevelVo() {
        return hostUserLevelVo;
    }

    public void setHostUserLevelVo(HostUserLevelVo hostUserLevelVo) {
        this.hostUserLevelVo = hostUserLevelVo;
    }

    public EnergyLevel getEnergyLevel() {
        return energyLevel;
    }

    public void setEnergyLevel(EnergyLevel energyLevel) {
        this.energyLevel = energyLevel;
    }

    public int getAdminId() {
        return adminId;
    }

    public void setAdminId(int adminId) {
        this.adminId = adminId;
    }

    public String getOperationName() {
        return operationName;
    }

    public void setOperationName(String operationName) {
        this.operationName = operationName;
    }

    public int getUnionId() {
        return unionId;
    }

    public void setUnionId(int unionId) {
        this.unionId = unionId;
    }

    public int getIconType() {
        return iconType;
    }

    public void setIconType(int iconType) {
        this.iconType = iconType;
    }

    public int getIconId() {
        return iconId;
    }

    public void setIconId(int iconId) {
        this.iconId = iconId;
    }

    public int getIsSvip() {
        return isSvip;
    }

    public void setIsSvip(int isSvip) {
        this.isSvip = isSvip;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public int getEnable() {
        return enable;
    }

    public void setEnable(int enable) {
        this.enable = enable;
    }

    public int getIsTop() {
        return isTop;
    }

    public void setIsTop(int isTop) {
        this.isTop = isTop;
    }

    public int getPositionSwitch() {
        return positionSwitch;
    }

    public void setPositionSwitch(int positionSwitch) {
        this.positionSwitch = positionSwitch;
    }

    public String getLocationProvince() {
        return locationProvince;
    }

    public void setLocationProvince(String locationProvince) {
        this.locationProvince = locationProvince;
    }

    public String getLocationCity() {
        return locationCity;
    }

    public void setLocationCity(String locationCity) {
        this.locationCity = locationCity;
    }

    public int getVipLevel() {
        return vipLevel;
    }

    public void setVipLevel(int vipLevel) {
        this.vipLevel = vipLevel;
    }

    public String getIsCallLine() {
        return isCallLine;
    }

    public void setIsCallLine(String isCallLine) {
        this.isCallLine = isCallLine;
    }

//    public int getStar() {
//        return star;
//    }
//
//    public void setStar(int star) {
//        this.star = star;
//    }

    public Boolean getCmsSw() {
        return cmsSw;
    }

    public void setCmsSw(Boolean cmsSw) {
        this.cmsSw = cmsSw;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public LocalDate getBirthday() {
        return birthday;
    }

    public void setBirthday(LocalDate birthday) {
        this.birthday = birthday;
    }

    public String getBirthdayInstant() {
        return birthdayInstant;
    }

    public void setBirthdayInstant(String birthdayInstant) {
        this.birthdayInstant = birthdayInstant;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public String getVoiceSignature() {
        return voiceSignature;
    }

    public void setVoiceSignature(String voiceSignature) {
        this.voiceSignature = voiceSignature;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public int getIsCall() {
        return isCall;
    }

    public void setIsCall(int isCall) {
        this.isCall = isCall;
    }

    public int getIsVideo() {
        return isVideo;
    }

    public void setIsVideo(int isVideo) {
        this.isVideo = isVideo;
    }

    public String getChatPrice() {
        return chatPrice;
    }

    public void setChatPrice(String chatPrice) {
        this.chatPrice = chatPrice;
    }

    public String getVideoPrice() {
        return videoPrice;
    }

    public void setVideoPrice(String videoPrice) {
        this.videoPrice = videoPrice;
    }

    public int getIsVip() {
        return isVip;
    }

    public void setIsVip(int isVip) {
        this.isVip = isVip;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public int getVipPayType() {
        return vipPayType;
    }

    public void setVipPayType(int vipPayType) {
        this.vipPayType = vipPayType;
    }

    public int getmGradeSum() {
        return mGradeSum;
    }

    public void setmGradeSum(int mGradeSum) {
        this.mGradeSum = mGradeSum;
    }

    public int getvGradeSum() {
        return vGradeSum;
    }

    public void setvGradeSum(int vGradeSum) {
        this.vGradeSum = vGradeSum;
    }

    public String getmGrade() {
        return mGrade;
    }

    public void setmGrade(String mGrade) {
        this.mGrade = mGrade;
    }

    public String getvGrade() {
        return vGrade;
    }

    public void setvGrade(String vGrade) {
        this.vGrade = vGrade;
    }

    public int getFollowSum() {
        return followSum;
    }

    public void setFollowSum(int followSum) {
        this.followSum = followSum;
    }

    public int getFansSum() {
        return fansSum;
    }

    public void setFansSum(int fansSum) {
        this.fansSum = fansSum;
    }

    public int getPrivatePhotoSum() {
        return privatePhotoSum;
    }

    public void setPrivatePhotoSum(int privatePhotoSum) {
        this.privatePhotoSum = privatePhotoSum;
    }

    public int getVisitorSum() {
        return visitorSum;
    }

    public void setVisitorSum(int visitorSum) {
        this.visitorSum = visitorSum;
    }

    public String getCallTimeSum() {
        return callTimeSum;
    }

    public void setCallTimeSum(String callTimeSum) {
        this.callTimeSum = callTimeSum;
    }

    public int getCallSuccessSum() {
        return callSuccessSum;
    }

    public void setCallSuccessSum(int callSuccessSum) {
        this.callSuccessSum = callSuccessSum;
    }

    public int getCallFailSum() {
        return callFailSum;
    }

    public void setCallFailSum(int callFailSum) {
        this.callFailSum = callFailSum;
    }

    public String getCallRate() {
        return callRate;
    }

    public void setCallRate(String callRate) {
        this.callRate = callRate;
    }

    public int getVideoSum() {
        return videoSum;
    }

    public void setVideoSum(int videoSum) {
        this.videoSum = videoSum;
    }

    public LocalDateTime getVisitorTime() {
        return visitorTime;
    }

    public void setVisitorTime(LocalDateTime visitorTime) {
        this.visitorTime = visitorTime;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getIsFollow() {
        return isFollow;
    }

    public void setIsFollow(int isFollow) {
        this.isFollow = isFollow;
    }

    public int getmNextGradeSum() {
        return mNextGradeSum;
    }

    public void setmNextGradeSum(int mNextGradeSum) {
        this.mNextGradeSum = mNextGradeSum;
    }

    public int getvNextGradeSum() {
        return vNextGradeSum;
    }

    public void setvNextGradeSum(int vNextGradeSum) {
        this.vNextGradeSum = vNextGradeSum;
    }

    public int getIsHost() {
        return isHost;
    }

    public void setIsHost(int isHost) {
        this.isHost = isHost;
    }

    public int getIsCertificationHost() {
        return isCertificationHost;
    }

    public void setIsCertificationHost(int isCertificationHost) {
        this.isCertificationHost = isCertificationHost;
    }

    public String getSay() {
        return say;
    }

    public void setSay(String say) {
        this.say = say;
    }

    public int getIsLine() {
        return isLine;
    }

    public void setIsLine(int isLine) {
        this.isLine = isLine;
    }

    public String getFollowDate() {
        return followDate;
    }

    public void setFollowDate(String followDate) {
        this.followDate = followDate;
    }

    public int getVoiceSignatureTime() {
        return voiceSignatureTime;
    }

    public void setVoiceSignatureTime(int voiceSignatureTime) {
        this.voiceSignatureTime = voiceSignatureTime;
    }

    public UserWallet getUserWallet() {
        return userWallet;
    }

    public void setUserWallet(UserWallet userWallet) {
        this.userWallet = userWallet;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getVestIcon() {
        return vestIcon;
    }

    public void setVestIcon(String vestIcon) {
        this.vestIcon = vestIcon;
    }

    public List<Label> getLabelList() {
        return labelList;
    }

    public void setLabelList(List<Label> labelList) {
        this.labelList = labelList;
    }

    public String getUserCoverUrl() {
        return userCoverUrl;
    }

    public void setUserCoverUrl(String userCoverUrl) {
        this.userCoverUrl = userCoverUrl;
    }

    public String getShowTime() {
        return showTime;
    }

    public void setShowTime(String showTime) {
        this.showTime = showTime;
    }

    public int getCallType() {
        return callType;
    }

    public void setCallType(int callType) {
        this.callType = callType;
    }

    public int getVipDate() {
        return vipDate;
    }

    public void setVipDate(int vipDate) {
        this.vipDate = vipDate;
    }

    public int getCallSuccessSumVoice() {
        return callSuccessSumVoice;
    }

    public void setCallSuccessSumVoice(int callSuccessSumVoice) {
        this.callSuccessSumVoice = callSuccessSumVoice;
    }

    public int getCallSuccessSumVideo() {
        return callSuccessSumVideo;
    }

    public void setCallSuccessSumVideo(int callSuccessSumVideo) {
        this.callSuccessSumVideo = callSuccessSumVideo;
    }

    public List<UserCoverUrl> getUserCoverUrlList() {
        return userCoverUrlList;
    }

    public void setUserCoverUrlList(List<UserCoverUrl> userCoverUrlList) {
        this.userCoverUrlList = userCoverUrlList;
    }

    public int getIntegralSum() {
        return integralSum;
    }

    public void setIntegralSum(int integralSum) {
        this.integralSum = integralSum;
    }

    public int getAgentId() {
        return agentId;
    }

    public void setAgentId(int agentId) {
        this.agentId = agentId;
    }

    public int getIsPlatinumVip() {
        return isPlatinumVip;
    }

    public void setIsPlatinumVip(int isPlatinumVip) {
        this.isPlatinumVip = isPlatinumVip;
    }
}